import instance from '@/utils/request.js'


export const getPlanList = (params) => {
  return instance({
    url: '/plan/list',
    method: 'get',
    params
  })
}
export const addPlan = (data) => {
  return instance({
    url: `/plan`,
    method: "post",
    data,
  })
}

export const deletePlan = (id) => {
  return instance({
    url: `/plan/${id}`,
    method: "delete",
  })
}



export const getPlanDetail = (id) => {
  return instance({
    url: `/plan/${id}`,
    method: "get",
  })
}


export const editPlan = (data) => {
  return instance({
    url: `/plan`,
    method: "put",
    data,
  })
}
